package codetrainning.test10;
/*
使用循环输出如下格式的数据
  1
  2  3
  4  5  6
  7  8  9  0
 */
public class Demo10 {
    public static void main(String[] args) {
        int count = 1;
        for (int i = 1; i < 5; i++) {
            for (int j = 1; j < i+1; j++) {
                if (count != 10) {
                    System.out.print(count++ +" ");
                }else {
                    System.out.print(0);
                }
            }
            System.out.println();
        }
    }
}
